package hotciv.agingstrategies;

import hotciv.framework.AgingStrategy;

public class VaryingAgingStrategy implements AgingStrategy
{
	
	private int age;
	
	public VaryingAgingStrategy()
	{
		age = -4000;
	}
	
	public void incrementAge()
	{
		//Between year 4000BC and 100 BC + 100
		if(age < -100)
		{
			age = age + 100;
		}
		//from year -100 to -1
		else if(age == -100)
		{
			age = -1;
		}
		//From year -1 to 1
		else if(age == -1)
		{
			age = +1;
		}
		//From 1 to 50
		else if(age == 1)
		{
			age = 50;
		}
		//Between age 50 and 1750 + 50
		else if(age < 1750)
		{
			age = age + 50;
		}
		//Between age 1750 and 1900 + 25
		else if(age < 1900)
		{
			age = age + 25;
		}
		//Between age 1900 and 1975 + 5
		else if(age < 1970)
		{
			age = age + 5;
		}
		else
		{
			age++;
		}
	}
	
	public int getAge()
	{
		return age;
	}
	
}
